Remove the redundant name and stock_id parameters, adjust all callers.
authorMatthias Clasen <maclas@gmx.de>
Wed, 7 Jan 2004 22:02:02 +0000 (22:02 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Wed, 7 Jan 2004 22:02:02 +0000 (22:02 +0000)
Wed Jan  7 23:03:32 2004  Matthias Clasen  <maclas@gmx.de>

* gtk/gtkactiongroup.h:
* gtk/gtkactiongroup.c (gtk_action_group_add_action_with_accel):
Remove the redundant name and stock_id parameters, adjust all callers.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkactiongroup.c
gtk/gtkactiongroup.h

index ba65c03fdfc374a18942bde09c2f739c99cd1606..f8aaf32c984721353656d4baa9e5db03278164a8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Wed Jan  7 23:03:32 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkactiongroup.h: 
+       * gtk/gtkactiongroup.c (gtk_action_group_add_action_with_accel): 
+       Remove the redundant name and stock_id parameters, adjust all callers.
+
 Wed Jan  7 22:20:20 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkaction.h: 
index ba65c03fdfc374a18942bde09c2f739c99cd1606..f8aaf32c984721353656d4baa9e5db03278164a8 100644 (file)
@@ -1,3 +1,9 @@
+Wed Jan  7 23:03:32 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkactiongroup.h: 
+       * gtk/gtkactiongroup.c (gtk_action_group_add_action_with_accel): 
+       Remove the redundant name and stock_id parameters, adjust all callers.
+
 Wed Jan  7 22:20:20 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkaction.h: 
index ba65c03fdfc374a18942bde09c2f739c99cd1606..f8aaf32c984721353656d4baa9e5db03278164a8 100644 (file)
@@ -1,3 +1,9 @@
+Wed Jan  7 23:03:32 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkactiongroup.h: 
+       * gtk/gtkactiongroup.c (gtk_action_group_add_action_with_accel): 
+       Remove the redundant name and stock_id parameters, adjust all callers.
+
 Wed Jan  7 22:20:20 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkaction.h: 
index ba65c03fdfc374a18942bde09c2f739c99cd1606..f8aaf32c984721353656d4baa9e5db03278164a8 100644 (file)
@@ -1,3 +1,9 @@
+Wed Jan  7 23:03:32 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkactiongroup.h: 
+       * gtk/gtkactiongroup.c (gtk_action_group_add_action_with_accel): 
+       Remove the redundant name and stock_id parameters, adjust all callers.
+
 Wed Jan  7 22:20:20 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkaction.h: 
index ba65c03fdfc374a18942bde09c2f739c99cd1606..f8aaf32c984721353656d4baa9e5db03278164a8 100644 (file)
@@ -1,3 +1,9 @@
+Wed Jan  7 23:03:32 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkactiongroup.h: 
+       * gtk/gtkactiongroup.c (gtk_action_group_add_action_with_accel): 
+       Remove the redundant name and stock_id parameters, adjust all callers.
+
 Wed Jan  7 22:20:20 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkaction.h: 
index 6389db80f30bb30813c95e43cbd8832a36542a79..348ce455146d7cbf0e246bdf7302905fc8a0a20b 100644 (file)
@@ -295,17 +295,16 @@ gtk_action_group_add_action (GtkActionGroup *action_group,
 
 /**
  * gtk_action_group_add_action_with_accel:
- * @action_group: the action group (#GtkActionGroup)
- * @action: the action to add (#GtkAction)
- * @name: the name of the action to add
+ * @action_group: the action group 
+ * @action: the action to add 
  * @accelerator: the accelerator for the action, in
- *   the format understood by gtk_accelerator_parse().
- * @stock_id: the stock icon to display
+ *   the format understood by gtk_accelerator_parse(), or %NULL to use the
+ *   stock accelerator 
  *
  * Adds an action object to the action group and sets up the accelerator.
  *
- * If @accelerator is %NULL, attempt to use the accelerator associated with
- * @stock_id.
+ * If @accelerator is %NULL, attempts to use the accelerator associated 
+ * with the stock_id of the action.
  *
  * Accel paths are set to
  * <literal>&lt;Actions&gt;/<replaceable>group-name</replaceable>/<replaceable>action-name</replaceable></literal>.
@@ -315,14 +314,16 @@ gtk_action_group_add_action (GtkActionGroup *action_group,
 void
 gtk_action_group_add_action_with_accel (GtkActionGroup *action_group,
                                        GtkAction *action,
-                                       const char *name,
-                                       const char *accelerator,
-                                       const char *stock_id)
+                                       const gchar *accelerator)
 {
   gchar *accel_path;
   guint  accel_key = 0;
   GdkModifierType accel_mods;
   GtkStockItem stock_item;
+  const gchar *name;
+  const gchar *stock_id;
+  
+  g_object_get (action, "name", &name, "stock_id", &stock_id, NULL);
 
   accel_path = g_strconcat ("<Actions>/",
                            action_group->private_data->name, "/", name, NULL);
@@ -487,10 +488,9 @@ gtk_action_group_add_actions_full (GtkActionGroup *action_group,
                               entries[i].callback, 
                               user_data, (GClosureNotify)destroy, 0);
 
-      gtk_action_group_add_action_with_accel (action_group, action,
-                                             entries[i].name,
-                                             entries[i].accelerator,
-                                             entries[i].stock_id);
+      gtk_action_group_add_action_with_accel (action_group, 
+                                             action,
+                                             entries[i].accelerator);
       g_object_unref (action);
     }
 }
@@ -586,9 +586,7 @@ gtk_action_group_add_toggle_actions_full (GtkActionGroup       *action_group,
 
       gtk_action_group_add_action_with_accel (action_group, 
                                              action,
-                                             entries[i].name,
-                                             entries[i].accelerator,
-                                             entries[i].stock_id);
+                                             entries[i].accelerator);
       g_object_unref (action);
     }
 }
@@ -699,9 +697,7 @@ gtk_action_group_add_radio_actions_full (GtkActionGroup      *action_group,
 
       gtk_action_group_add_action_with_accel (action_group, 
                                              action,
-                                             entries[i].name,
-                                             entries[i].accelerator,
-                                             entries[i].stock_id);
+                                             entries[i].accelerator);
       g_object_unref (action);
     }
 
index bd4ff94f6950383e25490d8dc299b341645c51df..c4ef39b55c582081d2da25c40d8ef892b8814ba5 100644 (file)
@@ -112,10 +112,8 @@ GList          *gtk_action_group_list_actions            (GtkActionGroup       *
 void            gtk_action_group_add_action              (GtkActionGroup       *action_group,
                                                          GtkAction            *action);
 void           gtk_action_group_add_action_with_accel   (GtkActionGroup *action_group,
-                                                         GtkAction *action,
-                                                         const char *name,
-                                                         const char *accelerator,
-                                                         const char *stock_id);
+                                                         GtkAction   *action,
+                                                         const gchar *accelerator);
 
 void            gtk_action_group_remove_action           (GtkActionGroup       *action_group,
                                                          GtkAction            *action);